namespace SimpleWebServices.Web.UI.Html
{
    using System;
    using SimpleWebServices.Data;
    using SimpleWebServices.Web.UI.Html.Validation;
    using Xunit;

    public sealed class IControlFacts
    {
        [Fact]
        public void typedef()
        {
            Assert.True(typeof(IControl).IsInterface);
        }

        [Fact]
        public void is_IElement()
        {
            Assert.True(typeof(IElement).IsAssignableFrom(typeof(IControl)));
        }

        [Fact]
        public void is_IAttributeDisabled()
        {
            Assert.True(typeof(IAttributeDisabled).IsAssignableFrom(typeof(IControl)));
        }

        [Fact]
        public void is_IAttributeTabIndex()
        {
            Assert.True(typeof(IAttributeTabIndex).IsAssignableFrom(typeof(IControl)));
        }

        [Fact]
        public void IControl_Name_get()
        {
            try
            {
                Name value = (new IControlDummy() as IControl).Name;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IControl_Name_set()
        {
            try
            {
                (new IControlDummy() as IControl).Name = null as Name;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IControl_Suppress_get()
        {
            try
            {
                bool value = (new IControlDummy() as IControl).Suppress;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IControl_Suppress_set()
        {
            try
            {
                (new IControlDummy() as IControl).Suppress = true;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IControl_Value_get()
        {
            try
            {
                string value = (new IControlDummy() as IControl).Value;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IControl_Value_set()
        {
            try
            {
                (new IControlDummy() as IControl).Value = string.Empty;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IControl_DataCollection()
        {
            try
            {
                DataCollection value = (new IControlDummy() as IControl).ToDataCollection();
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IControl_Update_Name_string()
        {
            try
            {
                (new IControlDummy() as IControl).Update(null as Name, string.Empty);
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IAttributeDisabled_Disabled_get()
        {
            try
            {
                bool value = ((new IControlDummy() as IControl) as IAttributeDisabled).Disabled;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IAttributeDisabled_Disabled_set()
        {
            try
            {
                ((new IControlDummy() as IControl) as IAttributeDisabled).Disabled = true;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IAttributeTabIndex_TabIndex_get()
        {
            try
            {
                int? value = ((new IControlDummy() as IControl) as IAttributeTabIndex).TabIndex;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IAttributeTabIndex_TabIndex_set()
        {
            try
            {
                ((new IControlDummy() as IControl) as IAttributeTabIndex).TabIndex = 1;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IValidation_IsValid_get()
        {
            try
            {
                bool value = ((new IControlDummy() as IControl) as IValidation).IsValid;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IValidation_Validator_get()
        {
            try
            {
                IValidate value = ((new IControlDummy() as IControl) as IValidation).Validator;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }

        [Fact]
        public void IValidation_Validator_set()
        {
            try
            {
                ((new IControlDummy() as IControl) as IValidation).Validator = null as IValidateDummy;
                Assert.True(false);
            }
            catch (NotSupportedException)
            {
            }
        }
    }
}